<?php
include_once dirname(__FILE__)."/../config.inc.php";
include_once dirname(__FILE__)."/pOHA.php";
include_once dirname(__FILE__)."/utils.php";
include_once dirname(__FILE__)."/database.php";
include_once dirname(__FILE__)."/constants.php";

class WebPage extends HTMLPage
{
    function WebPage($title, $bottomPart)
    {
        parent::HTMLPage(GAME_NAME.": ".$title, createUrl("core/style.css"), "it");
        
        $this->createHeader();
        
        $block = new HTMLBlock($bottomPart);
        $block->setAttribute("align", "center");
        $this->add($block);
        
        $this->createFooter();
    }
    
    private function createHeader()
    {
        $img = new HTMLImage(createUrl("images/header.png"));
        $img->setAttribute("border", "6");
        $img->setAttribute("class", "header");
        
        $block = new HTMLBlock($img->render());
        $block->setAttribute("align", "center");
        $this->add($block->render()."<br>");
    }
    
    private function createFooter()
    {
        $msg = "<i>".styledText("white", "10pt", "<br>Ottimizzato per la risoluzione 1024 x 768")."</i>";
        $block = new HTMLBlock($msg);
        $block->setAttribute("align", "center");
        $this->add($block);
    }
}
?>
